﻿using System;

namespace DR.WebUI.Code
{
    public static class FormatHelpers
    {
        public static string FormatDateTime(DateTime? dateTime)
        {
            return dateTime.HasValue ? dateTime.Value.ToString("dd.MM.yyyy hh:mm:ss") : string.Empty;
        }

        public static string FormatDate(DateTime? dateTime)
        {
            return dateTime.HasValue ? dateTime.Value.ToString("dd.MM.yyyy") : string.Empty;
        }

        public static string FormatHours(decimal hours)
        {
            return hours.ToString();
        }
    }
}